const path = require('path');
const config = require('./src/config');
const { baseUrl } = config;
function resolve(dir) {
	return path.join(__dirname, dir);
}
module.exports = {
	transpileDependencies: ['uview-ui', 'luch-request'],
	devServer: {
		open: true,
		proxy: {
			'/api': {
				target: baseUrl,
				changeOrigin: true,
				ws: true,
				pathRewrite: {
					'/api': ''
				}
			}
		}
	},
	chainWebpack: config => {
		config.resolve.alias.set('@', resolve('src'));
	}
};
